﻿using System.Modules.Contracts.DTO;
using System.Modules.SharePoint.Contracts.Attributes;
using Microsoft.SharePoint;

namespace System.Modules.SharePoint.Contracts.DTO
{
    /// <summary>
    /// Task List Item
    /// </summary>
    public class TaskListItem : BaseListItem
    {
        /// <summary>
        /// FieldNames
        /// </summary>
        public new enum FieldNames
        {
            /// <summary>
            /// PercentComplete
            /// </summary>
            PercentComplete,
            /// <summary>
            /// AssignedTo
            /// </summary>
            AssignedTo,
            /// <summary>
            /// StartDate
            /// </summary>
            StartDate,
            /// <summary>
            /// DueDate
            /// </summary>
            DueDate,
            /// <summary>
            /// Description
            /// </summary>
            Body,
            /// <summary>
            /// WorkflowItemId
            /// </summary>
            WorkflowItemId,
            /// <summary>
            /// Completed
            /// </summary>
            Completed
        }

        /// <summary>
        /// PercentComplete
        /// </summary>
        public Updatable<float?> PercentComplete { get; set; }
        /// <summary>
        /// AssignedTo
        /// </summary>
        public Updatable<SPFieldUserValue> AssignedTo { get; set; }
        /// <summary>
        /// StartDate
        /// </summary>
        public Updatable<DateTime?> StartDate { get; set; }
        /// <summary>
        /// DueDate
        /// </summary>
        public Updatable<DateTime?> DueDate { get; set; }
        /// <summary>
        /// Description
        /// </summary>
        [BindingSPField("Body")]
        public Updatable<string> Description { get; set; }
        /// <summary>
        /// WorkflowItemId
        /// </summary>
        public Updatable<int?> WorkflowItemId { get; set; }
        /// <summary>
        /// Completed
        /// </summary>
        public Updatable<bool?> Completed { get; set; }
    }
}